package vip.specimen.system.datasource.validation;

import lombok.Getter;
import lombok.Setter;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;

/**
 * *@Author: 余浪人
 * *@Date：2021/04/18 12:24
 * *@Email:yulangren520@Gmail.com
 * *@QQ:1368419640
 **/
@Getter
@Setter
public class SystemSaveConfigTencentValidation extends SystemSaveConfigValidation {
    @NotBlank(message = "请填写SecretId")
    private String tencentSecretId;
    @NotBlank(message = "请填写SecretKey")
    private String tencentSecretKey;
    @NotBlank(message = "请填写空间名称")
    @Pattern(regexp = "^[a-zA-Z]+([a-zA-Z]+|[0-9]+)-[0-9]+$", message = "请填写合法的空间名称")
    private String tencentBucketName;
    @NotBlank(message = "请填写所属地域")
    @Pattern(regexp = "^[a-zA-Z]+-[a-zA-Z]+$", message = "请填写合法的所属地域")
    private String tencentRegion;
    @NotBlank(message = "请填写访问域名")
    @Pattern(regexp = "^(http|https)://[a-zA-Z].*[a-zA-Z]$", message = "访问域名需以字母为开始与结尾")
    private String tencentDomain;
}
